﻿<%@ Page Language="C#" MasterPageFile="~/BackEnd.master" AutoEventWireup="true" CodeFile="~/Code/State Official Backend.aspx.cs"
    Inherits="State_Official_Backend" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cph_Main" runat="Server">
    <div style="text-align:center">Incident Display Page - Parliament Offical<br />
        </div>
    <br />
        <asp:FormView ID="FormView1" runat="server" DataKeyNames="Incident_ID" DataSourceID="ADS_Incident"
            Height="135px" Width="100%">
            <EditItemTemplate>
                Incident_ID:
                <asp:Label ID="Incident_IDLabel1" runat="server" Text='<%# Eval("Incident_ID") %>' />
                <br />
                Priority_ID:
                <asp:TextBox ID="Priority_IDTextBox" runat="server" 
                    Text='<%# Bind("Priority_ID") %>' />
                <br />
                User_ID:
                <asp:TextBox ID="User_IDTextBox" runat="server" Text='<%# Bind("User_ID") %>' />
                <br />
                Description:
                <asp:TextBox ID="DescriptionTextBox" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                Type:
                <asp:TextBox ID="TypeTextBox" runat="server" Text='<%# Bind("Type") %>' />
                <br />
                Landmark:
                <asp:TextBox ID="LandmarkTextBox" runat="server" 
                    Text='<%# Bind("Landmark") %>' />
                <br />
                City:
                <asp:TextBox ID="CityTextBox" runat="server" Text='<%# Bind("City") %>' />
                <br />
                State:
                <asp:TextBox ID="StateTextBox" runat="server" 
                    Text='<%# Bind("State") %>' />
                <br />
                Status:
                <asp:TextBox ID="StatusTextBox" runat="server" 
                    Text='<%# Bind("Status") %>' />
                <br />
                Date Reported:
                <asp:TextBox ID="Date_ReportedTextBox" runat="server" 
                    Text='<%# Bind("[Date Reported]") %>' />
                <br />
                Date Resolved:
                <asp:TextBox ID="Date_ResolvedTextBox" runat="server" 
                    Text='<%# Bind("[Date Resolved]") %>' />
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                    Text="Update" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                    CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <InsertItemTemplate>
                Priority_ID:
                <asp:TextBox ID="Priority_IDTextBox" runat="server" 
                    Text='<%# Bind("Priority_ID") %>' />
                <br />
                User_ID:
                <asp:TextBox ID="User_IDTextBox" runat="server" 
                    Text='<%# Bind("User_ID") %>' />
                <br />
                Description:
                <asp:TextBox ID="DescriptionTextBox" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                Type:
                <asp:TextBox ID="TypeTextBox" runat="server" Text='<%# Bind("Type") %>' />
                <br />
                Landmark:
                <asp:TextBox ID="LandmarkTextBox" runat="server" 
                    Text='<%# Bind("Landmark") %>' />
                <br />
                City:
                <asp:TextBox ID="CityTextBox" runat="server" Text='<%# Bind("City") %>' />
                <br />
                State:
                <asp:TextBox ID="StateTextBox" runat="server" 
                    Text='<%# Bind("State") %>' />
                <br />
                Status:
                <asp:TextBox ID="StatusTextBox" runat="server" 
                    Text='<%# Bind("Status") %>' />
                <br />
                Date Reported:
                <asp:TextBox ID="Date_ReportedTextBox" runat="server" 
                    Text='<%# Bind("[Date Reported]") %>' />
                <br />
                Date Resolved:
                <asp:TextBox ID="Date_ResolvedTextBox" runat="server" 
                    Text='<%# Bind("[Date Resolved]") %>' />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                    Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                    CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                Incident_ID:
                <asp:Label ID="Incident_IDLabel" runat="server" 
                    Text='<%# Eval("Incident_ID") %>' />
                <br />
                Priority_ID:
                <asp:Label ID="Priority_IDLabel" runat="server" 
                    Text='<%# Bind("Priority_ID") %>' />
                <br />
                User_ID:
                <asp:Label ID="User_IDLabel" runat="server" Text='<%# Bind("User_ID") %>' />
                <br />
                Description:
                <asp:Label ID="DescriptionLabel" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                Type:
                <asp:Label ID="TypeLabel" runat="server" Text='<%# Bind("Type") %>' />
                <br />
                Landmark:
                <asp:Label ID="LandmarkLabel" runat="server" Text='<%# Bind("Landmark") %>' />
                <br />
                City:
                <asp:Label ID="CityLabel" runat="server" Text='<%# Bind("City") %>' />
                <br />
                State:
                <asp:Label ID="StateLabel" runat="server" 
                    Text='<%# Bind("State") %>' />
                <br />
                Status:
                <asp:Label ID="StatusLabel" runat="server" 
                    Text='<%# Bind("Status") %>' />
                <br />
                Date Reported:
                <asp:Label ID="Date_ReportedLabel" runat="server" 
                    Text='<%# Bind("[Date Reported]") %>' />
                <br />
                Date Resolved:
                <asp:Label ID="Date_ResolvedLabel" runat="server" 
                    Text='<%# Bind("[Date Resolved]") %>' />
                <br />
            </ItemTemplate>
        </asp:FormView>
        <br />
&nbsp;&nbsp;&nbsp;
        <br />
        <br />
        <br />
        
        <asp:AccessDataSource ID="ADS_Incident" runat="server" 
            DataFile="~/App_Data/Database.accdb" 
            SelectCommand="SELECT * FROM [Incidents] WHERE ([Incident_ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Incident_ID" QueryStringField="id" 
                    Type="Int32" DefaultValue="1" />
            </SelectParameters>
        </asp:AccessDataSource>

</asp:Content>
